import VueRouter from 'vue-router'

import Homecontainer from './components/tabbar/Homecontainer.vue'
import Membercontainer from './components/tabbar/Membercontainer.vue'
import Shopcarcontainer from './components/tabbar/Shopcarcontainer.vue'
import Searchcontainer from './components/tabbar/Searchcontainer.vue'
import NewsList from './components/news/NewsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'
import PhotoList from './components/photos/PhotoList.vue'
import PhotoInfo from './components/photos/PhotoInfo.vue'
import GoodsList from './components/goodslist/GoodsList.vue'
import GoodsInfo from './components/goodslist/GoodsInfo.vue'
import GoodsDesc from './components/goodslist/GoodsDesc.vue'
import GoodsComment from './components/goodslist/GoodsComment.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/' ,redirect:'/home'},
    {path:'/home' ,component:Homecontainer},
    {path:'/member',component:Membercontainer},
    {path:'/shopcar',component:Shopcarcontainer},
    {path:'/search',component:Searchcontainer},
    {path:'/home/newslist',component:NewsList},
    {path:'/home/newsinfo/',component:NewsInfo},
    {path:'/home/photolist',component:PhotoList},
    {path:'/home/photoinfo/:id',component:PhotoInfo},
    {path:'/home/goodslist' ,component:GoodsList},
    {path:'/home/goodsinfo',component:GoodsInfo},
    {path:'/home/goodsDesc',component:GoodsDesc,name:'goodsDesc'},
    {path:'/home/goodsComment',component:GoodsComment,name:'goodsComment'},
  ],
  linkActiveClass: 'mui-active'
})

// 把路由对象暴露出去
export default router